package com.example.kkk;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.noble.library.utils.JniUtil;


public class MainActivity extends AppCompatActivity {

    TextView enTv, deTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        enTv = (TextView) findViewById(R.id.en);
        deTv = (TextView) findViewById(R.id.de);

        try {
//            String str = "你好，world";
            String str = "{\"nickname\":\"小镇\",\"ie\":\"867830010248591\",\"age\":18,\"ms\":10,\"gender\":1,\"ver\":10,\"s_sid\":\"1000\",\"pkgname\":\"com.noble.glamour\",\"s_uid\":\"1000\",\"y\":116.829557,\"x\":38.311689}";
            str = JniUtil.GetEncryptString(str);
            enTv.setText(str);


            String str1 = new String(JniUtil.GetDecryptString(str));
            deTv.setText(str1);
        } catch (Exception e) {
        }
    }
}
